package cn.juque.common.constants;

/**
 * @author nuoka
 * @version 1.0.0
 * <li>IntelliJ IDEA</li>
 * <li>cn.juque.cn.juque.common.wx</li>
 * @date 2021/7/27 0:00
 **/
public class WxConstants {

    private WxConstants() {
    }

    /**
     * 微信登录
     * <li>授权类型，此处只需填写 authorization_code</li>
     */
    public static final String CODE_2_SESSION = "https://api.weixin.qq.com/sns/jscode2session?appid={}&secret={}&js_code={}&grant_type=authorization_code";

    public static final String ACCESS_TOKEN = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={}&secret={}";

    public static final String WX_PAY_CREATE_ORDER = "https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi";

    /**
     * 通知的类型，支付成功通知的类型为TRANSACTION.SUCCESS
     */
    public static final String EVENT_TYPE_TRANSACTION_SUCCESS = "TRANSACTION.SUCCESS";

    /**
     * 通知的资源数据类型，支付成功通知为encrypt-resource
     */
    public static final String RESOURCE_TYPE_ENCRYPT_RESOURCE = "encrypt-resource";

    /**
     * 关闭订单
     */
    public static final String CLOSE_ORDER = "https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/{}/close";

    /**
     * 查询订单详情
     */
    public static final String QUERY_ORDER_DETAIL = "https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/{}?mchid={}";
}
